#ifndef INDENTER_H
#define INDENTER_H

#include "tabsettings.h"

#include <QTextCursor>
#include <QTextDocument>

class Indenter
{
public:
    Indenter();
    virtual ~Indenter();

    virtual bool isElectricCharacter(const QChar &ch) const;

    virtual void indentBlock(QTextDocument *doc,
                             const QTextBlock &block,
                             const QChar &typedChar,
                             const TabSettings &tabSettings);

    virtual void indent(QTextDocument *doc,
                        const QTextCursor &cursor,
                        const QChar &typedChar,
                        const TabSettings &tabSettings);

    virtual void reindent(QTextDocument *doc, const QTextCursor &cursor, const TabSettings &tabSettings);

    //virtual void setCodeStylePreferences(ICodeStylePreferences *preferences);

    virtual void invalidateCache(QTextDocument *doc);
};

#endif // INDENTER_H
